package com.wjc.train.batch.feign;

import com.wjc.train.batch.req.TrainQueryReq;
import com.wjc.train.common.resp.CommonResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Date;

/**
 * @author Guessed
 */
@FeignClient("business")
public interface BusinessFeign {

    @PostMapping("/business/admin/train/query-list")
    public CommonResp queryList(@RequestBody TrainQueryReq trainQueryReq);

    @GetMapping("/business/admin/daily-train/gen-daily/{date}")
    public CommonResp genDaily(@PathVariable @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);
}
